﻿summerready = function(){
	
	/*
	//初始化推送
	appMsg.initialize({
		onDeviceReady : function() {
			console.log('设置注册成功！');
		},
		onReceiveMessage : onReceiveMessage,
		onOpenNotification : onOpenNotification,
		onReceiveNotification : onReceiveNotification
	});*/
	initMenu();
	openTab('main','main');
};

function onReceiveMessage(event) {
	try {
		var message = '';
		if ($summer.os == "android") {
			message = event.message;
		} else {
			message = event.content;
		}
		alert(message);
	} catch (exception) {
		console.dir("JPushPlugin:onReceiveMessage-->" + exception);
	}
};

function onReceiveNotification() {
	console.log('onReceiveNotification');
	console.dir(arguments);
}

function onOpenNotification(event) {
	console.log('onOpenNotification');
	console.dir(arguments);

	if (device.platform == "Android") {
		alertContent = event.alert;
	} else {
		alertContent = event.aps.alert;
	}

}